/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author wcl
* @date 2021-03-25
**/
@Entity
@Data
@Table(name="doc_inquiry")
public class DocInquiry implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "id")
    private Integer id;

    @Column(name = "patient_id")
    @ApiModelProperty(value = "患者id")
    private Integer patientId;

    @Column(name = "sex")
    @ApiModelProperty(value = "性别")
    private String sex;

    @Column(name = "age")
    @ApiModelProperty(value = "年龄")
    private Integer age;

    @Column(name = "job")
    @ApiModelProperty(value = "职业")
    private String job;

    @Column(name = "phone")
    @ApiModelProperty(value = "患者手机号")
    private String phone;

    @Column(name = "patient_name")
    @ApiModelProperty(value = "患者姓名")
    private String patientName;

    @Column(name = "doctor_id")
    @ApiModelProperty(value = "医生id")
    private Integer doctorId;

    @Column(name = "doctor_name")
    @ApiModelProperty(value = "医生姓名")
    private String doctorName;

    @Column(name = "illness")
    @ApiModelProperty(value = "病情描述")
    private String illness;

    @Column(name = "suggest")
    @ApiModelProperty(value = "医生意见")
    private String suggest;

    public void copy(DocInquiry source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}